#ifndef QTUI_CONFIGURATION_CENTER_HPP
#define QTUI_CONFIGURATION_CENTER_HPP

#include "QtUI/QtUIConfig.hpp"
#include "AbsUI/UIConfigurationCenter.hpp"

class QUndoStack;

namespace QtUI
{

/// @ingroup QtUI
/// @brief It adds new information to the configuration center, specific to Qt user interface.
/// 
/// Additional information consists of the undo stack for undoable commands.
class QTUI_API QtUIConfigurationCenter: public AbsUI::UIConfigurationCenter
{
public:
	/// @brief It initializes the configuration center.
	/// @sa AbsUI::UIConfigurationCenter::UIConfigurationCenter( 
	///			Storage::ConnectionConfigCollection&, const std::string&, AbsUI::UIFactory&)
	QtUIConfigurationCenter( 
		Storage::ConnectionConfigCollection& connCfgColl, const std::string& profilePath, AbsUI::UIFactory& rUIFactory);

	/// @brief It gets a casted reference to the singleton instance of this class.
	static QtUIConfigurationCenter& qtUIConfigCenter() 
	{ 
		return dynamic_cast< QtUIConfigurationCenter&>( Storage::ConfigurationCenter::configCenter()); 
	}

	/// @brief It gets the undo stack for Qt undoable commands.
	/// @{
	const QUndoStack* undoStack() const { return pUndoStack_; }
	QUndoStack* undoStack() { return pUndoStack_;}
	/// @}

private:
	QUndoStack* pUndoStack_;
};


} // namespace QtUI

#endif // QTUI_CONFIGURATION_CENTER_HPP